{include file="public/head" /}
<!--有理想的地方，地狱都是天堂-->
<!--Copyright @ df81.com 版权所有-->
<!--作者: 南国老符 邮箱：1062129401@qq.com-->
        <!-- 左侧菜单 开始 -->
        <div class="sidebar">
            <nav>
                <ul class="nav nav-pills nav-sidebar flex-column nav-flat nav-legacy d-block d-md-none" data-widget="treeview" role="menu" data-accordion="false">
                    {include file="public/left_content" /}
                </ul>
                <ul class="nav nav-pills nav-sidebar flex-column nav-flat nav-legacy d-block d-md-none" data-widget="treeview" role="menu" data-accordion="false">
                    {include file="public/left_data" /}
                </ul>
                <ul class="nav nav-pills nav-sidebar flex-column nav-flat nav-legacy" data-widget="treeview" role="menu" data-accordion="false">
                    {include file="public/left_global" /}
                </ul>
                <ul class="nav nav-pills nav-sidebar flex-column nav-flat nav-legacy d-block d-md-none" data-widget="treeview" role="menu" data-accordion="false">
                    {include file="public/left_system" /}
                </ul>
            </nav>
        </div>
        <!-- 左侧菜单 结束 -->
    </aside>
    <!-- 左侧 结束 -->
    <!-- 右侧 开始 -->
    <div class="content-wrapper">
        <!-- 内容导航 开始 -->
        <div class="content-header py-2 bg-white mb-3">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-sm-12">
                        <ol class="breadcrumb">
                            <li>{:lang('v_global')}<i class="fas fa-angle-right mx-2"></i></li>
                            <li>{:lang('v_global')}<i class="fas fa-angle-right mx-2"></i></li>
                            <li>{:lang('v_chat')}</li>
                        </ol>
                    </div>
                </div>
            </div>
        </div>
        <!-- 内容导航 结束 -->
        <!-- 内容主体 开始 -->
        <section class="content">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-md-12">
                        <div class="card">
                            <div class="card-body">
                                <div class="w-100 mb-3">
                                    <a class="btn btn-success mb-2 mr-2" href="{:url('/chat/index',['lang'=>$lang])}"><i class="fas fa-headset mr-1"></i>{:lang('v_chat')} {:lang('v_manage')}</a>
                                    <a class="btn btn-default mb-2 mr-2" href="{:url('/chat/edit',['lang'=>$lang])}"><i class="fa fa-plus-circle"></i> {:lang('v_add')} {:lang('v_chat')}</a>
                                    {if config('app.isdisplay.typeattribute') eq 1}
                                        <a class="btn btn-default mb-2 mr-2" href="{:url('/attribute/index',['lang'=>$lang,'tabledir'=>'chat'])}"><i class="fa fa-tag"></i> {:lang('v_attribute')} {:lang('v_manage')}</a>
                                        <a class="btn btn-default mb-2" href="{:url('/attribute/edit',['lang'=>$lang,'tabledir'=>'chat'])}"><i class="fa fa-plus-circle"></i> {:lang('v_add')} {:lang('v_attribute')}</a>
                                    {/if}
                                </div>
                                <table class="table table-striped table-bordered table-hover">
                                    <form name="form_list" id="form_list" action="" method="post">
                                        <tr>
                                            <th width="100" class="text-center">ID</th>
                                            <th class="d-invisible">{:lang('v_chattype')}</th>
                                            <th>{:lang('v_chatname')}</th>
                                            <th class="d-invisible">{:lang('v_account')}</th>
                                            <th width="150" class="text-center d-invisible">{:lang('v_sequence')}</th>
                                            <th width="200" class="text-center">{:lang('v_do')}</th>
                                        </tr>
                                        {volist name="list" id="rs"}
                                            <input type="hidden" name="id[]" value="{$rs.id}" />
                                            <tr>
                                                <td class="text-center">
                                                    <label class="form-check form-check-inline">
                                                        <input type="checkbox" name="selectid[]" id="selectid" value="{$rs.id}" class="mr-1" />
                                                        <span class="d-invisible">{$rs.id}</span>
                                                    </label>
                                                </td>
                                                <td class="d-invisible">
                                                    <img src="{$rs.thumb}" height="17" align="absmiddle" onerror="this.src='{:config('template.skin')}/img/nopic.png'" />
                                                    {switch name="rs.att_type"}
                                                        {case value="wangwang"}{:lang('v_wangwang')}{/case}
                                                        {default /}{$rs.att_type}
                                                    {/switch}
                                                </td>
                                                <td><input name="title[]" type="text" value="{$rs.title}" class="form-control" /></td>
                                                <td class="d-invisible"><input name="account[]" type="text" value="{$rs.account}" class="form-control" /></td>
                                                <td class="text-center d-invisible">
                                                    <input name="sequence[]" type="text" value="{$rs.sequence}" class="input" size="5" />
                                                </td>
                                                <td class="text-center">
                                                    <a href="{:url('/chat/edit',['lang'=>$lang,'id'=>$rs['id']])}" class="btn btn-sm btn-success mb-2 mr-2"><i class="fa fa-fw fa-edit mr-1"></i>{:lang('v_edit')}</a>
                                                    <span onClick="javascript:do_confirm('','','{:url('/chat/delete_one',['lang'=>$lang,'id'=>$rs['id']])}','','');" class="btn btn-sm btn-danger mb-2"><i class="fa fa-fw fa-trash mr-1"></i>{:lang('v_delete')}</a>
                                                </td>
                                            </tr>
                                        {/volist}
                                        <tr>
                                            <td colspan="7">
                                                <div class="row">
                                                    <div class="col-xl-6 mt-2"><div class="float-lg-left mr-4">{$list->render()|raw}</div><div class="float-lg-left">{:lang('v_total')} {$lastPage} {:lang('v_page')} {$total} {:lang('v_records')}</div></div>
                                                    <div class="col-xl-6 mt-2 mt-md-1">
                                                        <div class="float-left float-xl-right">
                                                            <!-- 全选 -->
                                                            <button type="button" class="btn btn-info mr-2 checkbox-toggle"><i class="far fa-fw fa-square mr-1"></i>{:lang('v_select_all')}</button>
                                                            <!-- 更新 -->
                                                            <button type="button" class="btn btn-success mr-2" onClick="javascript:do_ajax('#form_list','','{:url('/chat/update_all',['lang'=>$lang])}','');"><i class="fa fa-fw fa-sync-alt mr-1"></i>{:lang('v_batch')} {:lang('v_update')}</button>
                                                            <!-- 真实删除 -->
                                                            <button type="button" class="btn btn-danger" onClick="javascript:do_confirm('#form_list','','{:url('/chat/delete_all',['lang'=>$lang])}','','');"><i class="fa fa-fw fa-trash mr-1"></i>{:lang('v_delete_select')}</button>
                                                        </div>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                    </form>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        <!-- 内容主体 结束 -->
    </div>
    <!-- 右侧 结束 -->
{include file="public/foot" /}
</body>
</html>